<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="${root!}/static/css/layout.css" rel="stylesheet"
	type="text/css" />
<link href="${root!}/static/css/skin.css" rel="stylesheet"
	type="text/css" />
<link href="${root!}/static/css/dialog.css" rel="stylesheet"
	type="text/css" />

<script src="${root!}/static/Js/jquery-1.4.2.js" type="text/javascript"></script>

<script src="${root!}/static/js/layout.js" type="text/javascript"></script>

<script src="${root!}/static/js/dialog.js" type="text/javascript"></script>

<script src="${root!}/static/js/form.js" type="text/javascript"></script>

<script>
	var RootPath = "${root!}";
	var FormCodeUrl = RootPath + "/frame/field";
	var FormSubmitMethod = "save";
	var FormSubmitAction = "${action!}";

	$(document).ready(function() {
		
		$("#lstTableName").val("${bean.tableId!}");
		
		$("#lstFieldType").val("${bean.fieldType!}");
		
		$("#lstType").val("${bean.typeId!}");
		
		if("${bean.isKey!}"=="1")
		{
			$("#chkIsKey").attr("checked","true");
		}
		if("${bean.isAllowNull!}"=="1")
		{
			$("#chkIsAllowNull").attr("checked","true");
		}

	});

	function SubmitClick() {
		if (!CheckForm()) {
			return false;
		} else {
			SubmitForm();
		}
	}
</script>

<script>
	function aab() {

		Confirm('您是否要做删除操作？', function() {
			//确定
			Success("恭喜");
		}, function() {
			//取消
			Alert("警告");
		});

	}
</script>

</head>
<body>
	<form id="myform">
		<div class="container">
			<div class="fullwidth">
				<div class="buttonGroup h30">
					<input type="button" value="确定" id="btnSubmit"
						onclick="SubmitClick();" /> <input type="button" value="取消"
						id="btnInsert" onclick="CloseWindow();" />
				</div>
			</div>
			<div class="hiddencalc fullwidth h4"></div>
			<div class="fullwidth calcheight onlyscrolly">
				<div class="formcontainer calcwidth">
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">字段编号：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtFieldId"
								name="txtFieldId" value="${bean.fieldId!}" readonly />
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">选择表：</font>
						</div>
						<div class="control calcwidth">
							<select id="lstTableName" name="lstTableName" class="calcwidth">
								<option value="">请选择</option>
								<#if tableList??><#list tableList as m>
								<option value="${m.TableId!}">${m.TableName!}</option>
								</#list></#if>
							</select><span class="hiddencalc inputresult init" minlength="1"
								maxlength="50" controlname="选择表" bindcontrol="lstTableName"></span>
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">字段名称：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtFieldName"
								name="txtFieldName" value="${bean.fieldName!}" /><span
								class="hiddencalc inputresult init" minlength="1" maxlength="50"
								controlname="字段名称" bindcontrol="txtFieldName"></span>
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">字段描述：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtFieldText"
								name="txtFieldText" value="${bean.fieldText!}" />
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">已有类型：</font>
						</div>
						<div class="control calcwidth">
							<select id="lstType" name="lstType" class="calcwidth">
								<option value="">请选择</option>
								<#if useTypeList??><#list useTypeList as m>
								<option value="${m.code!}">${m.text!}</option>
								</#list></#if>
							</select> <span class="hiddencalc inputresult init" minlength="1"
								controlname="已有类型" bindcontrol="lstType"></span>
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">操作：</font>
						</div>
						<div class="control calcwidth">
							<input type="checkbox" id="chkIsKey" name="chkIsKey" value="1" /> <font>是否主键</font>
							<input type="checkbox" id="chkIsAllowNull" name="chkIsAllowNull" value="1" />
							<font>允许为空</font>
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">数据类型：</font>
						</div>
						<div class="control calcwidth">
							<select id="lstFieldType" name="lstFieldType" class="calcwidth">
								<option value="">请选择</option>
								<#if typeList??><#list typeList as m>
								<option value="${m.code!}">${m.text!}</option>
								</#list></#if>
							</select> <span class="hiddencalc inputresult init" minlength="1"
								controlname="已有类型" bindcontrol="lstFieldType"></span>
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">数据长度：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtFieldLength"
								name="txtFieldLength" value="${bean.fieldLength!}" /><span
								class="hiddencalc inputresult init" validateregular="数字"
								minlength="1" maxlength="50" controlname="数据长度"
								bindcontrol="txtFieldLength"></span>
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">字符白名单：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtWordWhite"
								name="txtWordWhite" value="${bean.wordWhite!}" />
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">字符黑名单：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtWordBlack"
								name="txtWordBlack" value="${bean.wordBlack!}" />
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">正则表达式：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtFieldRegex"
								name="txtFieldRegex" value="${bean.fieldRegex!}" />
						</div>
					</div>
					<div class="formitem halfwidth h30">
						<div class="label w150">
							<font class="labeltext">顺序号：</font>
						</div>
						<div class="control calcwidth">
							<input type="text" class="calcwidth" id="txtOrderNumber"
								name="txtOrderNumber" value="${bean.orderNumber!}" /><span
								class="hiddencalc inputresult init" validateregular="数字"
								minlength="1" maxlength="50" controlname="顺序号"
								bindcontrol="txtOrderNumber"></span>
						</div>
					</div>

				</div>
				<div class="scrollwidth hiddencalc" style="display: none;">
					<!--滚动条占位宽度-->
				</div>
			</div>
		</div>
	</form>
</body>
</html>
